#!/usr/bin/node

const log = console.log;
try{
  //CPU架构信息及操作系统版本信息
  log(`architecture:${process.arch}`);
  log(`platform:${process.platform}\n`);

  //进程id信息及Node.js可执行文件的绝对路径
  log(`process id:${process.pid}`);
  log(`exePath:${process.execPath}\n`);

  //Node.js版本信息、登录用户id信息、用户所属组id信息、脚本所在路径信息
  log(`node version:${process.version}`);
  log(`user id:${process.getuid()}`);
  log(`group id:${process.getgid()}`);
  log(`cwd:${process.cwd()}\n`);

  log('eve:');
  log(process.env);
  log(`host name:${process.env.HOSTNAME}`);

  log(`rss:${process.memoryUsage().rss}`);
  log(`heapTotal:${process.memoryUsage().heapTotal}`);
}catch(e){
  console.error('something wrong!');
}
